3.4.80 \(\int x (a+b \log (c (d+e x)^n)) (f+g \log (c (d+e x)^n)) \, dx\) [380]

3.4.80.1 Optimal result
3.4.80.2 Mathematica [A] (verified)
3.4.80.3 Rubi [A] (verified)
3.4.80.4 Maple [A] (verified)
3.4.80.5 Fricas [A] (verification not implemented)
3.4.80.6 Sympy [A] (verification not implemented)
3.4.80.7 Maxima [A] (verification not implemented)
3.4.80.8 Giac [B] (verification not implemented)
3.4.80.9 Mupad [B] (verification not implemented)

3.4.80.1 Optimal result

Integrand size = 30, antiderivative size = 196 \[ \int x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=-\frac {2 b d g n^2 x}{e}+\frac {b g n^2 (d+e x)^2}{4 e^2}+\frac {b d^2 g n^2 \log ^2(d+e x)}{2 e^2}+\frac {1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+\frac {d n (d+e x) \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{e^2}-\frac {n (d+e x)^2 \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{4 e^2}-\frac {d^2 n \log (d+e x) \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{2 e^2} \]

output
-2*b*d*g*n^2*x/e+1/4*b*g*n^2*(e*x+d)^2/e^2+1/2*b*d^2*g*n^2*ln(e*x+d)^2/e^2 
+1/2*x^2*(a+b*ln(c*(e*x+d)^n))*(f+g*ln(c*(e*x+d)^n))+d*n*(e*x+d)*(b*f+a*g+ 
2*b*g*ln(c*(e*x+d)^n))/e^2-1/4*n*(e*x+d)^2*(b*f+a*g+2*b*g*ln(c*(e*x+d)^n)) 
/e^2-1/2*d^2*n*ln(e*x+d)*(b*f+a*g+2*b*g*ln(c*(e*x+d)^n))/e^2
 
3.4.80.2 Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 152, normalized size of antiderivative = 0.78 \[ \int x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {e x (2 a d g n+2 b d n (f-3 g n)+a e (2 f-g n) x+b e n (-f+g n) x)-2 d^2 (b f+a g) n \log (d+e x)+2 \left (a e^2 g x^2+b \left (3 d^2 g n+2 d e g n x+e^2 (f-g n) x^2\right )\right ) \log \left (c (d+e x)^n\right )-2 b g \left (d^2-e^2 x^2\right ) \log ^2\left (c (d+e x)^n\right )}{4 e^2} \]

input
Integrate[x*(a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]),x]
 
output
(e*x*(2*a*d*g*n + 2*b*d*n*(f - 3*g*n) + a*e*(2*f - g*n)*x + b*e*n*(-f + g* 
n)*x) - 2*d^2*(b*f + a*g)*n*Log[d + e*x] + 2*(a*e^2*g*x^2 + b*(3*d^2*g*n + 
 2*d*e*g*n*x + e^2*(f - g*n)*x^2))*Log[c*(d + e*x)^n] - 2*b*g*(d^2 - e^2*x 
^2)*Log[c*(d + e*x)^n]^2)/(4*e^2)
 
3.4.80.3 Rubi [A] (verified)

Time = 0.46 (sec) , antiderivative size = 177, normalized size of antiderivative = 0.90, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2883, 2858, 27, 2772, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right ) \, dx\)

\(\Big \downarrow \) 2883

\(\displaystyle \frac {1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )-\frac {1}{2} e n \int \frac {x^2 \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{d+e x}dx\)

\(\Big \downarrow \) 2858

\(\displaystyle \frac {1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )-\frac {1}{2} n \int \frac {x^2 \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{d+e x}d(d+e x)\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )-\frac {n \int \frac {e^2 x^2 \left (b f+a g+2 b g \log \left (c (d+e x)^n\right )\right )}{d+e x}d(d+e x)}{2 e^2}\)

\(\Big \downarrow \) 2772

\(\displaystyle \frac {1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )-\frac {n \left (-2 b g n \int \left (\frac {\log (d+e x) d^2}{d+e x}-2 d+\frac {1}{2} (d+e x)\right )d(d+e x)+d^2 \log (d+e x) \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )-2 d (d+e x) \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )+\frac {1}{2} (d+e x)^2 \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )\right )}{2 e^2}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )-\frac {n \left (d^2 \log (d+e x) \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )-2 d (d+e x) \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )+\frac {1}{2} (d+e x)^2 \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )-2 b g n \left (\frac {1}{2} d^2 \log ^2(d+e x)+\frac {1}{4} (d+e x)^2-2 d (d+e x)\right )\right )}{2 e^2}\)

input
Int[x*(a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]),x]
 
output
(x^2*(a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]))/2 - (n*(-2*b*g 
*n*(-2*d*(d + e*x) + (d + e*x)^2/4 + (d^2*Log[d + e*x]^2)/2) - 2*d*(d + e* 
x)*(b*f + a*g + 2*b*g*Log[c*(d + e*x)^n]) + ((d + e*x)^2*(b*f + a*g + 2*b* 
g*Log[c*(d + e*x)^n]))/2 + d^2*Log[d + e*x]*(b*f + a*g + 2*b*g*Log[c*(d + 
e*x)^n])))/(2*e^2)
 

3.4.80.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2772
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_ 
.))^(q_.), x_Symbol] :> With[{u = IntHide[x^m*(d + e*x^r)^q, x]}, Simp[(a + 
 b*Log[c*x^n])   u, x] - Simp[b*n   Int[SimplifyIntegrand[u/x, x], x], x]] 
/; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q 
, 1] && EqQ[m, -1])
 

rule 2858
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_ 
.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))^(r_.), x_Symbol] :> Simp[1/e   Subst[In 
t[(g*(x/e))^q*((e*h - d*i)/e + i*(x/e))^r*(a + b*Log[c*x^n])^p, x], x, d + 
e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - 
d*g, 0] && (IGtQ[p, 0] || IGtQ[r, 0]) && IntegerQ[2*r]
 

rule 2883
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + Log[(c_.) 
*((d_) + (e_.)*(x_))^(n_.)]*(g_.))*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)* 
(a + b*Log[c*(d + e*x)^n])*((f + g*Log[c*(d + e*x)^n])/(m + 1)), x] - Simp[ 
e*(n/(m + 1))   Int[(x^(m + 1)*(b*f + a*g + 2*b*g*Log[c*(d + e*x)^n]))/(d + 
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, m}, x] && NeQ[m, -1]
 
3.4.80.4 Maple [A] (verified)

Time = 0.56 (sec) , antiderivative size = 284, normalized size of antiderivative = 1.45

method result size
parallelrisch \(-\frac {-2 x^{2} \ln \left (c \left (e x +d \right )^{n}\right )^{2} b \,e^{2} g +2 x^{2} \ln \left (c \left (e x +d \right )^{n}\right ) b \,e^{2} g n -x^{2} e^{2} b g \,n^{2}-10 \ln \left (e x +d \right ) b \,d^{2} g \,n^{2}-2 x^{2} \ln \left (c \left (e x +d \right )^{n}\right ) a \,e^{2} g -2 x^{2} \ln \left (c \left (e x +d \right )^{n}\right ) b \,e^{2} f +x^{2} e^{2} n a g +b \,e^{2} f n \,x^{2}-4 x \ln \left (c \left (e x +d \right )^{n}\right ) b d e g n +6 x e b d g \,n^{2}+2 \ln \left (e x +d \right ) a \,d^{2} g n +2 \ln \left (e x +d \right ) b \,d^{2} f n -2 a \,e^{2} f \,x^{2}-2 a d e g n x -2 b d e f n x +2 \ln \left (c \left (e x +d \right )^{n}\right )^{2} b \,d^{2} g +4 \ln \left (c \left (e x +d \right )^{n}\right ) b \,d^{2} g n -6 b \,d^{2} g \,n^{2}+2 a \,d^{2} g n +2 d^{2} b f n}{4 e^{2}}\) \(284\)
risch \(\text {Expression too large to display}\) \(1558\)

input
int(x*(a+b*ln(c*(e*x+d)^n))*(f+g*ln(c*(e*x+d)^n)),x,method=_RETURNVERBOSE)
 
output
-1/4*(-2*x^2*ln(c*(e*x+d)^n)^2*b*e^2*g+2*x^2*ln(c*(e*x+d)^n)*b*e^2*g*n-x^2 
*e^2*b*g*n^2-10*ln(e*x+d)*b*d^2*g*n^2-2*x^2*ln(c*(e*x+d)^n)*a*e^2*g-2*x^2* 
ln(c*(e*x+d)^n)*b*e^2*f+x^2*e^2*n*a*g+b*e^2*f*n*x^2-4*x*ln(c*(e*x+d)^n)*b* 
d*e*g*n+6*x*e*b*d*g*n^2+2*ln(e*x+d)*a*d^2*g*n+2*ln(e*x+d)*b*d^2*f*n-2*a*e^ 
2*f*x^2-2*a*d*e*g*n*x-2*b*d*e*f*n*x+2*ln(c*(e*x+d)^n)^2*b*d^2*g+4*ln(c*(e* 
x+d)^n)*b*d^2*g*n-6*b*d^2*g*n^2+2*a*d^2*g*n+2*d^2*b*f*n)/e^2
 
3.4.80.5 Fricas [A] (verification not implemented)

Time = 0.29 (sec) , antiderivative size = 256, normalized size of antiderivative = 1.31 \[ \int x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {2 \, b e^{2} g x^{2} \log \left (c\right )^{2} + {\left (b e^{2} g n^{2} + 2 \, a e^{2} f - {\left (b e^{2} f + a e^{2} g\right )} n\right )} x^{2} + 2 \, {\left (b e^{2} g n^{2} x^{2} - b d^{2} g n^{2}\right )} \log \left (e x + d\right )^{2} - 2 \, {\left (3 \, b d e g n^{2} - {\left (b d e f + a d e g\right )} n\right )} x + 2 \, {\left (2 \, b d e g n^{2} x + 3 \, b d^{2} g n^{2} - {\left (b e^{2} g n^{2} - {\left (b e^{2} f + a e^{2} g\right )} n\right )} x^{2} - {\left (b d^{2} f + a d^{2} g\right )} n + 2 \, {\left (b e^{2} g n x^{2} - b d^{2} g n\right )} \log \left (c\right )\right )} \log \left (e x + d\right ) + 2 \, {\left (2 \, b d e g n x - {\left (b e^{2} g n - b e^{2} f - a e^{2} g\right )} x^{2}\right )} \log \left (c\right )}{4 \, e^{2}} \]

input
integrate(x*(a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm="fr 
icas")
 
output
1/4*(2*b*e^2*g*x^2*log(c)^2 + (b*e^2*g*n^2 + 2*a*e^2*f - (b*e^2*f + a*e^2* 
g)*n)*x^2 + 2*(b*e^2*g*n^2*x^2 - b*d^2*g*n^2)*log(e*x + d)^2 - 2*(3*b*d*e* 
g*n^2 - (b*d*e*f + a*d*e*g)*n)*x + 2*(2*b*d*e*g*n^2*x + 3*b*d^2*g*n^2 - (b 
*e^2*g*n^2 - (b*e^2*f + a*e^2*g)*n)*x^2 - (b*d^2*f + a*d^2*g)*n + 2*(b*e^2 
*g*n*x^2 - b*d^2*g*n)*log(c))*log(e*x + d) + 2*(2*b*d*e*g*n*x - (b*e^2*g*n 
 - b*e^2*f - a*e^2*g)*x^2)*log(c))/e^2
 
3.4.80.6 Sympy [A] (verification not implemented)

Time = 0.65 (sec) , antiderivative size = 296, normalized size of antiderivative = 1.51 \[ \int x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\begin {cases} - \frac {a d^{2} g \log {\left (c \left (d + e x\right )^{n} \right )}}{2 e^{2}} + \frac {a d g n x}{2 e} + \frac {a f x^{2}}{2} - \frac {a g n x^{2}}{4} + \frac {a g x^{2} \log {\left (c \left (d + e x\right )^{n} \right )}}{2} - \frac {b d^{2} f \log {\left (c \left (d + e x\right )^{n} \right )}}{2 e^{2}} + \frac {3 b d^{2} g n \log {\left (c \left (d + e x\right )^{n} \right )}}{2 e^{2}} - \frac {b d^{2} g \log {\left (c \left (d + e x\right )^{n} \right )}^{2}}{2 e^{2}} + \frac {b d f n x}{2 e} - \frac {3 b d g n^{2} x}{2 e} + \frac {b d g n x \log {\left (c \left (d + e x\right )^{n} \right )}}{e} - \frac {b f n x^{2}}{4} + \frac {b f x^{2} \log {\left (c \left (d + e x\right )^{n} \right )}}{2} + \frac {b g n^{2} x^{2}}{4} - \frac {b g n x^{2} \log {\left (c \left (d + e x\right )^{n} \right )}}{2} + \frac {b g x^{2} \log {\left (c \left (d + e x\right )^{n} \right )}^{2}}{2} & \text {for}\: e \neq 0 \\\frac {x^{2} \left (a + b \log {\left (c d^{n} \right )}\right ) \left (f + g \log {\left (c d^{n} \right )}\right )}{2} & \text {otherwise} \end {cases} \]

input
integrate(x*(a+b*ln(c*(e*x+d)**n))*(f+g*ln(c*(e*x+d)**n)),x)
 
output
Piecewise((-a*d**2*g*log(c*(d + e*x)**n)/(2*e**2) + a*d*g*n*x/(2*e) + a*f* 
x**2/2 - a*g*n*x**2/4 + a*g*x**2*log(c*(d + e*x)**n)/2 - b*d**2*f*log(c*(d 
 + e*x)**n)/(2*e**2) + 3*b*d**2*g*n*log(c*(d + e*x)**n)/(2*e**2) - b*d**2* 
g*log(c*(d + e*x)**n)**2/(2*e**2) + b*d*f*n*x/(2*e) - 3*b*d*g*n**2*x/(2*e) 
 + b*d*g*n*x*log(c*(d + e*x)**n)/e - b*f*n*x**2/4 + b*f*x**2*log(c*(d + e* 
x)**n)/2 + b*g*n**2*x**2/4 - b*g*n*x**2*log(c*(d + e*x)**n)/2 + b*g*x**2*l 
og(c*(d + e*x)**n)**2/2, Ne(e, 0)), (x**2*(a + b*log(c*d**n))*(f + g*log(c 
*d**n))/2, True))
 
3.4.80.7 Maxima [A] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 224, normalized size of antiderivative = 1.14 \[ \int x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {1}{2} \, b g x^{2} \log \left ({\left (e x + d\right )}^{n} c\right )^{2} - \frac {1}{4} \, b e f n {\left (\frac {2 \, d^{2} \log \left (e x + d\right )}{e^{3}} + \frac {e x^{2} - 2 \, d x}{e^{2}}\right )} - \frac {1}{4} \, a e g n {\left (\frac {2 \, d^{2} \log \left (e x + d\right )}{e^{3}} + \frac {e x^{2} - 2 \, d x}{e^{2}}\right )} + \frac {1}{2} \, b f x^{2} \log \left ({\left (e x + d\right )}^{n} c\right ) + \frac {1}{2} \, a g x^{2} \log \left ({\left (e x + d\right )}^{n} c\right ) + \frac {1}{2} \, a f x^{2} - \frac {1}{4} \, {\left (2 \, e n {\left (\frac {2 \, d^{2} \log \left (e x + d\right )}{e^{3}} + \frac {e x^{2} - 2 \, d x}{e^{2}}\right )} \log \left ({\left (e x + d\right )}^{n} c\right ) - \frac {{\left (e^{2} x^{2} + 2 \, d^{2} \log \left (e x + d\right )^{2} - 6 \, d e x + 6 \, d^{2} \log \left (e x + d\right )\right )} n^{2}}{e^{2}}\right )} b g \]

input
integrate(x*(a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm="ma 
xima")
 
output
1/2*b*g*x^2*log((e*x + d)^n*c)^2 - 1/4*b*e*f*n*(2*d^2*log(e*x + d)/e^3 + ( 
e*x^2 - 2*d*x)/e^2) - 1/4*a*e*g*n*(2*d^2*log(e*x + d)/e^3 + (e*x^2 - 2*d*x 
)/e^2) + 1/2*b*f*x^2*log((e*x + d)^n*c) + 1/2*a*g*x^2*log((e*x + d)^n*c) + 
 1/2*a*f*x^2 - 1/4*(2*e*n*(2*d^2*log(e*x + d)/e^3 + (e*x^2 - 2*d*x)/e^2)*l 
og((e*x + d)^n*c) - (e^2*x^2 + 2*d^2*log(e*x + d)^2 - 6*d*e*x + 6*d^2*log( 
e*x + d))*n^2/e^2)*b*g
 
3.4.80.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 467 vs. \(2 (186) = 372\).

Time = 0.32 (sec) , antiderivative size = 467, normalized size of antiderivative = 2.38 \[ \int x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {{\left (e x + d\right )}^{2} b g n^{2} \log \left (e x + d\right )^{2}}{2 \, e^{2}} - \frac {{\left (e x + d\right )} b d g n^{2} \log \left (e x + d\right )^{2}}{e^{2}} - \frac {{\left (e x + d\right )}^{2} b g n^{2} \log \left (e x + d\right )}{2 \, e^{2}} + \frac {2 \, {\left (e x + d\right )} b d g n^{2} \log \left (e x + d\right )}{e^{2}} + \frac {{\left (e x + d\right )}^{2} b g n \log \left (e x + d\right ) \log \left (c\right )}{e^{2}} - \frac {2 \, {\left (e x + d\right )} b d g n \log \left (e x + d\right ) \log \left (c\right )}{e^{2}} + \frac {{\left (e x + d\right )}^{2} b g n^{2}}{4 \, e^{2}} - \frac {2 \, {\left (e x + d\right )} b d g n^{2}}{e^{2}} + \frac {{\left (e x + d\right )}^{2} b f n \log \left (e x + d\right )}{2 \, e^{2}} - \frac {{\left (e x + d\right )} b d f n \log \left (e x + d\right )}{e^{2}} + \frac {{\left (e x + d\right )}^{2} a g n \log \left (e x + d\right )}{2 \, e^{2}} - \frac {{\left (e x + d\right )} a d g n \log \left (e x + d\right )}{e^{2}} - \frac {{\left (e x + d\right )}^{2} b g n \log \left (c\right )}{2 \, e^{2}} + \frac {2 \, {\left (e x + d\right )} b d g n \log \left (c\right )}{e^{2}} + \frac {{\left (e x + d\right )}^{2} b g \log \left (c\right )^{2}}{2 \, e^{2}} - \frac {{\left (e x + d\right )} b d g \log \left (c\right )^{2}}{e^{2}} - \frac {{\left (e x + d\right )}^{2} b f n}{4 \, e^{2}} + \frac {{\left (e x + d\right )} b d f n}{e^{2}} - \frac {{\left (e x + d\right )}^{2} a g n}{4 \, e^{2}} + \frac {{\left (e x + d\right )} a d g n}{e^{2}} + \frac {{\left (e x + d\right )}^{2} b f \log \left (c\right )}{2 \, e^{2}} - \frac {{\left (e x + d\right )} b d f \log \left (c\right )}{e^{2}} + \frac {{\left (e x + d\right )}^{2} a g \log \left (c\right )}{2 \, e^{2}} - \frac {{\left (e x + d\right )} a d g \log \left (c\right )}{e^{2}} + \frac {{\left (e x + d\right )}^{2} a f}{2 \, e^{2}} - \frac {{\left (e x + d\right )} a d f}{e^{2}} \]

input
integrate(x*(a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm="gi 
ac")
 
output
1/2*(e*x + d)^2*b*g*n^2*log(e*x + d)^2/e^2 - (e*x + d)*b*d*g*n^2*log(e*x + 
 d)^2/e^2 - 1/2*(e*x + d)^2*b*g*n^2*log(e*x + d)/e^2 + 2*(e*x + d)*b*d*g*n 
^2*log(e*x + d)/e^2 + (e*x + d)^2*b*g*n*log(e*x + d)*log(c)/e^2 - 2*(e*x + 
 d)*b*d*g*n*log(e*x + d)*log(c)/e^2 + 1/4*(e*x + d)^2*b*g*n^2/e^2 - 2*(e*x 
 + d)*b*d*g*n^2/e^2 + 1/2*(e*x + d)^2*b*f*n*log(e*x + d)/e^2 - (e*x + d)*b 
*d*f*n*log(e*x + d)/e^2 + 1/2*(e*x + d)^2*a*g*n*log(e*x + d)/e^2 - (e*x + 
d)*a*d*g*n*log(e*x + d)/e^2 - 1/2*(e*x + d)^2*b*g*n*log(c)/e^2 + 2*(e*x + 
d)*b*d*g*n*log(c)/e^2 + 1/2*(e*x + d)^2*b*g*log(c)^2/e^2 - (e*x + d)*b*d*g 
*log(c)^2/e^2 - 1/4*(e*x + d)^2*b*f*n/e^2 + (e*x + d)*b*d*f*n/e^2 - 1/4*(e 
*x + d)^2*a*g*n/e^2 + (e*x + d)*a*d*g*n/e^2 + 1/2*(e*x + d)^2*b*f*log(c)/e 
^2 - (e*x + d)*b*d*f*log(c)/e^2 + 1/2*(e*x + d)^2*a*g*log(c)/e^2 - (e*x + 
d)*a*d*g*log(c)/e^2 + 1/2*(e*x + d)^2*a*f/e^2 - (e*x + d)*a*d*f/e^2
 
3.4.80.9 Mupad [B] (verification not implemented)

Time = 1.45 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.04 \[ \int x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx=x\,\left (\frac {d\,\left (a\,f-b\,g\,n^2\right )}{e}-\frac {d\,\left (a\,f-\frac {a\,g\,n}{2}-\frac {b\,f\,n}{2}+\frac {b\,g\,n^2}{2}\right )}{e}\right )+\ln \left (c\,{\left (d+e\,x\right )}^n\right )\,\left (\left (\frac {a\,g}{2}+\frac {b\,f}{2}-\frac {b\,g\,n}{2}\right )\,x^2+\left (\frac {d\,\left (a\,g+b\,f\right )}{e}-\frac {d\,\left (a\,g+b\,f-b\,g\,n\right )}{e}\right )\,x\right )+{\ln \left (c\,{\left (d+e\,x\right )}^n\right )}^2\,\left (\frac {b\,g\,x^2}{2}-\frac {b\,d^2\,g}{2\,e^2}\right )+x^2\,\left (\frac {a\,f}{2}-\frac {a\,g\,n}{4}-\frac {b\,f\,n}{4}+\frac {b\,g\,n^2}{4}\right )-\frac {\ln \left (d+e\,x\right )\,\left (a\,d^2\,g\,n+b\,d^2\,f\,n-3\,b\,d^2\,g\,n^2\right )}{2\,e^2} \]

input
int(x*(a + b*log(c*(d + e*x)^n))*(f + g*log(c*(d + e*x)^n)),x)
 
output
x*((d*(a*f - b*g*n^2))/e - (d*(a*f - (a*g*n)/2 - (b*f*n)/2 + (b*g*n^2)/2)) 
/e) + log(c*(d + e*x)^n)*(x*((d*(a*g + b*f))/e - (d*(a*g + b*f - b*g*n))/e 
) + x^2*((a*g)/2 + (b*f)/2 - (b*g*n)/2)) + log(c*(d + e*x)^n)^2*((b*g*x^2) 
/2 - (b*d^2*g)/(2*e^2)) + x^2*((a*f)/2 - (a*g*n)/4 - (b*f*n)/4 + (b*g*n^2) 
/4) - (log(d + e*x)*(a*d^2*g*n + b*d^2*f*n - 3*b*d^2*g*n^2))/(2*e^2)